#include "dialog.h"
#include "QPushButton"
#include "QLabel"
#include <qfont.h>
dialog::dialog(QString str)
{
    QLabel * label = new QLabel;
    QFont font;
    font.setPointSize(20);
    label->setFont(font);
    label->setParent(this);
    label->setText(str);
    label->move(150,110);
    label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
    label->show();
    this->setFixedSize(800,400);
    QPushButton * startbtn = new QPushButton("开始新游戏",this);
    startbtn->resize(200,80);
    startbtn->move(this->width()*0.1,this->height()*0.75);
    QPushButton * restartbtn = new QPushButton("重新开始这局游戏",this);
    restartbtn->resize(200,80);
    restartbtn->move(this->width()*0.375,this->height()*0.75);
    QPushButton * backbtn = new QPushButton("返回主菜单",this);
    backbtn->resize(200,80);
    connect(backbtn,&QPushButton::clicked,[=](){
        emit this -> Backtomenu();
    });
    backbtn->move(this->width()*0.65,this->height()*0.75);
}
